-- GENERATED SPELL FOR [Ethereal Arcanist] --


function spell0_21405(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(33833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21405', 659, 1)
end

function spell1_21405(pUnit, Event) --@Der\'izu Focus,Self--
pUnit:FullCastSpellOnTarget(32936,pUnit)
pUnit:RegisterEvent('Sorts_21405', 641, 1)
end

function spell2_21405(pUnit, Event) --@Force Blast,n/a--
pUnit:FullCastSpellOnTarget(39039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21405', 567, 1)
end

function Sorts_21405(pUnit, Event)
local choix_sorts_21405 = math.random(0, 2)
if choix_sorts_21405 == 0 then
pUnit:RegisterEvent('spell0_21405', 1, 1)
end
if choix_sorts_21405 == 1 then
pUnit:RegisterEvent('spell1_21405', 1, 1)
end
if choix_sorts_21405 == 2 then
pUnit:RegisterEvent('spell2_21405', 1, 1)
end
end

function mob21405_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21405', math.random(1500, 3000), 1)
end

function mob21405_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21405_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21405_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21405, 1, 'mob21405_Action')
RegisterUnitEvent(21405, 2, 'mob21405_Leave')
RegisterUnitEvent(21405, 3, 'mob21405_Kill')
RegisterUnitEvent(21405, 4, 'mob21405_Die')
